package org.ricks.ioc.utils;


public class ClassUtils {

    public static <T> T newInstance(Class<T> clazz) {
        T obj;
        try {
            obj = clazz.getConstructor().newInstance();
        } catch (Throwable e) {
            throw new IocException("IOC反射实例化失败！",e);
        }
        return obj;
    }
}
